#+TITLE: Example
#+AUTHOR: Joshua Branson
#+DATE: [2024-01-25 Thu 16:00]

* TODO fix Path math everywhere
#+BEGIN_SRC C
  #include <stdio.h>

  #define PATH_MAX "evil"

  int main () {
    return 0;
  }
#+END_SRC

** DONE [#A] convince the Guix people to use scheme everywhere       :scheme:

#+BEGIN_SRC scheme
  (define (main args)
    ;;the option specification tells getopt-long how
    ;; to parse the command line
    (let* ((option-spec '((version (single-char #\v) (value #f))
			  (help    (single-char #\h) (value #f))
			  (calc    (single-char #\c) (value #t)
				   ;; (required #t)
				   )))
	   ;; tell getopt-long to parse the command line and put the
	   ;; data in options
	   (options (getopt-long args option-spec))
	   ;; was  --help or -h used?
	   (help-wanted (option-ref options 'help #f))
	   (version-wanted (option-ref options 'version #f))
	   ;; was -c or --calc used?  If there was no value given,
	   ;; then return #f
	   (calc-wanted (option-ref options '() #f)))
      (if (or version-wanted help-wanted)
	  (cond
	   (help-wanted
	    (display "calc [options]\n")
	    (display "-v  --version  Display version\n")
	    (display "-h, --help     Display this help info\n"))
	   (version-wanted
	    (display "calc version 0.1\n")))
	  (display calc-wanted))))

#+END_SRC
